<!--
 * @Author: your name
 * @Date: 2020-12-28 10:06:10
 * @LastEditTime: 2020-12-28 10:20:13
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \basiccss\box\juzhong.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>居中设置</title>
    <style>
        article{
            border: solid 1px red;
        }
        h2,h3{
            border: solid 10px #dddddd;
        }
        h2{
            width: 300px;
            margin-left: 200px;
            margin-right: 200px;
        }
        h3{
            width: 500px;
            margin-left: auto;
            margin-right: auto;
        }
       
    </style>
</head>
<body>
    <article>
        <h2>houdunren.com</h2>
        <h3>hdcms.com</h3>
    </article>
</body>
</html>